#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <qpainter.h>
#include <qbitmap.h>
#include <qstring.h>
#include <qtimer.h>

#include "CDGWidgetBase.h"

class CDGWidget : public QWidget, public CDGWidgetBase
{
  Q_OBJECT;
  public:
    CDGWidget(QWidget *parent=0, const char *name=0 );
    virtual ~CDGWidget();

    bool play(const QString& filename, bool useTransp=true, bool useTransBkg=true, bool useTransBorder=true);
    void stop();
    void info();

 protected:
    void paintEvent( QPaintEvent * );
    void customEvent(QCustomEvent *event);

 public slots:
        void nextPos();
  
 private:
    int m_pixsize;
    int m_border_top;
    int m_border_left;

    QPixmap m_offscreen;
    QBitmap m_mask;
    QPixmap m_bgimage;
};

